package com.aaa.sptingboot.controller;

import com.aaa.sptingboot.OssObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class HelloController {
    @GetMapping("/hello")
    public String hello() {
        return "Hello Spring Boot!";
    }
    @Autowired
    private OssObject ossobject;
    @GetMapping("/oss")
    public void oss(){
        System.out.println("-----------"+ossobject);

    }
    @Value("${oss.bucketName}")
    private String name;

    @GetMapping("/name")
    public String name(){
        System.out.println(name);
        return name;
    }
}
